<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model workin\modules\increment\models\IdcardCheck */

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Idcard Checks'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="idcard-check-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id',
            'grant_key',
            'api_key',
            'business_code',
            'name',
            'id_card',
            'order_report_id',
            'search_index',
//            'result_detail:ntext',
//            'result_photo_base64:ntext',
            'result_result',
            'result_report_id',
//            'result_auth_status',
            'result_service_fee',
            'result_is_real',
            'result_exp_status',
            'result_busi_code',
            'result_busi_msg',
            'result_extend_data:ntext',
            /*[
                'attribute' => "result_photo_base64",
                'format' => [
                    'image',
//                    ['width'=>'40','height'=>'30',],
                ],//这个不确定能不能用
                'value' => Html::img("data:image/jpg;base64,".$model->result_photo_base64),
            ],*/
        ],
    ]) ?>
    <p>
        <?=Html::img("data:image/jpg;base64,".$model->result_photo_base64) ?>
    </p>
</div>
